package com.nstechs.commerce.common.util;


public class BuildUtil {
    
    public static synchronized String randomNumber(Integer length) {
        int suffixLength = length - 13;
        int setp = (int) Math.round((double) suffixLength / 18);
        int mod = suffixLength % 18;
        StringBuilder randomNumber = new StringBuilder(String.valueOf(System.currentTimeMillis()));
        for (int k = 0; k < setp; k++) {
            randomNumber.append(String.valueOf((long) (Math.random() * Math.pow(10, 18)))); 
        }
        if (mod != 0) randomNumber.append(String.valueOf((long) (Math.random() * Math.pow(10, mod)))); 
        return randomNumber.toString();
    }
    
}